#ifndef _DealCamera_H
#define _DealCamera_H
#include "DCMI.h"
#define Pi 3.14159265
#define SQR2 1.414
#define CodeNum 20000
typedef struct
{
	int x;
	int y;
}p_Point;
extern p_Point p_Start;
//extern u8 Image_Dis[CAMERA_H][CAMERA_W];
extern u8 ChainCode[CodeNum];
extern int ChainCount;
extern int threshold;
extern unsigned char OTSU_threshold(unsigned char *pic,unsigned short int num);
extern bool SmoothMedian(unsigned char *pImageData, int nWidth, int nHeight, int nWidthStep);
extern bool DrawContour(unsigned char *pImageData, int nWidth, int nHeight,p_Point ptStart,u8* ChainCode);
extern u8 TraceContour(unsigned char *pImageData, int nWidth, int nHeight,p_Point *pStart);
extern  float CaclCircle(u8 *Code,u32 CodeLen,p_Point *pStart);
void ImageDeal(u8 image[CAMERA_H][CAMERA_W]);
#endif

